import 'package:flutter/material.dart';

class Demo4 extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return new Demo4State();
  }
}

class Demo4State extends State<Demo4>{
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('DecoratedBox'),
      ),
      body: new Padding(
        padding: EdgeInsets.symmetric(vertical: 30.0, horizontal: 20.0),
        child: new DecoratedBox(
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(6.0),
            gradient: LinearGradient(colors: [Colors.blue, Colors.blue[100]]),
            boxShadow: [
              BoxShadow(
                color: Colors.black45,
                offset: Offset(2.0, 2.0),
                blurRadius: 3.0
              )
            ]
          ),          
          child: new Padding(
            padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0),
            child: new Text('DecoratedBox', style: TextStyle(color: Colors.white)),
          ),
        ),
      ),
    );
  }
}